<?php

require_once "core/application/models/mexchange/mexchange1.php";

class Mexchange2 extends Mexchange1 {

    private $_query;
    private $_fetch = array();

    protected function getCharId($charName) {
        /**
         * @param string $charName
         * @return ID ����
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "SELECT `id` FROM `players` WHERE `name` = '$charName'";
        $fetch = mysql_fetch_assoc(DB::getInstance()->sql($this->_query));
        return $fetch['id'];
        DB::getInstance()->closeConnection();
        unset($this->_query, $this->_fetch);
    }

}

?>